<!DOCTYPE>
<html>
<head>
	<meta charset="UTF-8">
    <title>留言板</title>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
	<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="/company2/public/static/assets/css/footer.css" />	
	<link rel="stylesheet" href="/company2/public/static/assets/css/css.css" />
    <link href='http://cdn.webfont.youziku.com/webfonts/nomal/93857/46587/58f6f1f3f629d81378fbf8fe.css' rel='stylesheet' type='text/css' />
</head>
<style>

</style>
<body>
	<nav class="navbar-inverse navbar-default" role="navigation">
		<div class="container-fluid"> 
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target="#example-navbar-collapse">
				<span class="sr-only">切换导航</span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="/company2/public/index/index/index">COMPANY</a>
		</div>
		
	
		<div class="collapse navbar-collapse" id="example-navbar-collapse">
			<ul class="nav navbar-nav">
				<li class="active"><a href="/company2/public/index/index/index">主页</a></li>
				<li><a href="/company2/public/index/shige">诗歌</a></li>
				<li><a href="/company2/public/index/write/message">留言板</a></li>
			</ul>
			<ul class="nav navbar-nav navbar-right"> 
		        {if condition="$Think.session.username != null"}
				<li><a href="#"><span class="glyphicon glyphicon-user"></span> {$Think.session.username}</a></li> 
				<li><a href="/company2/public/index/write/logout"><span class="glyphicon glyphicon-log-in"></span> 退出</a></li> 
		    	{else/}
		        <li><a href="/company2/public/index/regist"><span class="glyphicon glyphicon-user"></span> 注册</a></li> 
		        <li><a href="/company2/public/index/login"><span class="glyphicon glyphicon-log-in"></span> 登录</a></li> 
		    	{/if}
			</ul> 
		</div>
		</div>
	</nav>
     <div class="page-container">
        <h1>留言板</h1>
		<form action="/company2/public/index/write/write" class="message_form" method="post">
		    <input type="text" name="message_title" class="input" class="title" placeholder="标题">
		    <textarea name="message_content" class="message_content" class="input" placeholder="请输入留言内容" rows="5"></textarea>
		    <button type="submit" class="submit">提交留言</button>
		</form>
		
		
		{volist name="list" id="vo"}
		<div class="message_show">
			<div class="row">
				<div class="face col-sm-2 col-xs-2">
					<img src="/company2/public/static/assets/{$vo.face}" />
					<p class="user">{$vo.user}</p>
				</div>
				
				<div class="content col-sm-10 col-xs-10">
					<div class="panel panel-default">
						<div class="panel-heading">
					    	<!--
                            	作者：1461451270@qq.com
                            	时间：2017-04-01
                            	描述：留言框的三角形
                            -->
							<div class="san"></div>
					        	<span class="title">标题： {$vo.title}</span>
					        	<span class="time">时间:{$vo.lastdate}</span>
					    </div>
					    <div class="panel-body">
					        {$vo.content}
					        {if condition="$Think.session.username != null"}
								<span class="reviwer"><a data-toggle="collapse" data-target="#{$vo.id}" >回复</a></span>
							{/if}
						</div>
					</div>
					<!--
                    	作者：1461451270@qq.com
                    	时间：2017-04-03
                    	描述：回复面板
                    -->
		        	<div id="{$vo.id}" class="collapse out">
		        		<div class="panel panel-default">
		        			<form action="/company2/public/index/write/review" method="post">
							    <div class="panel-heading">
							        <span class="reviwer_name"><b>{$Think.session.username
							        }</b>回复给<b>{$vo.user}</b> </span>
			        				<span class="time" id="review_time">时间:</span>
									<input type="text" name="id" value="{$vo.id}" style="display:none" />
									<input type="text" name="user" value="{$vo.user}"  style="display:none" />
							    </div>
							    <div class="panel-body">
							        <textarea name="re_content" class="form-control"  required="required"></textarea>
							    </div>
							    <input type="submit" class="btn btn-default" value="回复留言"/>
						    </form>
						</div>
		        	</div>
					
		        	<!--
                    	作者：1461451270@qq.com
                    	时间：2017-04-03
                    	描述：回复评论
                    -->
                    
					{volist name="$re_list" id="voo"}
					
					{eq name="$vo.id" value="$voo.by_reviewer_messageid"}
				    <div class="review">
						<div class="media panel panel-default">
							<a class="pull-left" href="#">
						        <img class="media-object re_face" src="/company2/public/static/assets/{$voo.face}" />
						    </a>
						    <div class="media-body">
						        <h6 class="media-heading">
						        	<span class="head"><b>{$voo.reviewer}</b>回复给<b>{$voo.by_reviewer}</b> </span>
	        						<span class="time">时间:{$voo.re_datetime}</span>
						        </h6>
						       	<span>{$voo.re_content}</span>
						       
						    </div>
						</div>
					</div>
					{/eq}
					{/volist}
					
				</div>
			</div>
		</div>
		
		{/volist}

		<!--{volist name="list" id="vo"}
		<dt><a href="#">{$vo.id}:{$vo.title}:{$vo.content}</a></dt>
		{/volist}-->

	</div>
	<footer class="navbar-bottom">
		<p>(c) Copyright 2017 PHP第一小组. All Rights Reserved. </p>
	</footer>
    <script src="/company2/public/static/assets/js/supersized.3.2.7.min.js"></script>
    <script src="/company2/public/static/assets/js/scripts.js"></script>
	<script>
		var mydate = new Date();
		var mytime=mydate.toLocaleString(); 
		$("#review_time").html(mytime);
		if($(window).height()==$(document).height()){
	        $(".navbar-bottom").addClass("navbar-fixed-bottom");
	      }
	      else{
	        $(".navbar-bottom").removeClass(" navbar-fixed-bottom");
	      }
	</script>

</div>
</body>
</html>